.TH RRD2CSV 1 "September 20, 2012" "RRD2CSV User Manual" "Version 1.0"
.SH NAME
.PP
rrd2csv - extract RRDs from xcp-rrdd in the CSV format
.SH SYNOPSIS
.PP
rrd2csv [\f[I]options\f[]] [\f[I]datasource-descriptor\f[]]*
.SH DESCRIPTION
.PP
rrd2csv is a tool to output RRD values in CSV format.
It runs inside dom0, and by default displays all active datasources that
RRDD maintains, but it is also possible to select datasources of
interest as command-line arguments.
.PP
\f[I]Datasources\f[] (or \f[I]DS\f[]) are RRD concepts.
They are objects that have measurements associated with them.
They include a metric, a source from which the metric originate, and a
consolidation function.
For instance, if you have multiple VMs, you will have as many
"memory_target" datasources as you have VMs.
.SH OPTIONS
.TP
.B -n
Show name labels instead of UUIDs.
.RS
.RE
.TP
.B -s \f[I]SECONDS\f[]
Specify the sampling period, i.e.
the time that rrd2csv will wait before displaying a new line of values.
Note that if you specify a sampling period smaller than the period of
the data sources, the first line of output will be a warning indicating
that you will get redundant data lines.
.RS
.RE
.TP
.B -u
Show UUIDs as well as name labels.
.RS
.RE
.TP
.B -v, --version
Print version.
.RS
.RE
.TP
.B -h, --help
Show usage message.
.RS
.RE
.SH DATASOURCE DESCRIPTOR
.IP
.nf
\f[C]
DS\ \ \ \ \ ::=\ CF\ ":"\ SOURCE\ ":"\ UUID\ ":"\ METRIC
CF\ \ \ \ \ ::=\ "AVERAGE"\ |\ "MIN"\ |\ "MAX"\ |\ "LAST"
SOURCE\ ::=\ "host"\ |\ "vm"
UUID\ \ \ ::=\ string,\ e.g.\ "6266c08b-1992-696e-80ed-68ebdd4c36f4"
METRIC\ ::=\ string,\ e.g.\ "memory_target"
\f[]
.fi
.PP
UUID is the XenAPI\[aq]s UUID of the source and METRIC the metric name.
If you omit any of the fields, this will act as a wildcard.
As an example, specifying ":::" will select all enabled datasources,
whereas ":vm::" will select only the datasources related to VMs.
Multiple datasources can be specified on the command line; the result
will be the union of individual filter results.
.SH EXAMPLES
.PP
Select host related metrics:
.IP
.nf
\f[C]
$\ rrd2csv\ :host::
\f[]
.fi
.PP
Select VM related metrics:
.IP
.nf
\f[C]
$\ rrd2csv\ :vm::
\f[]
.fi
.PP
Select host metrics that use AVERAGE as consolidation function and any
metric that has name "memory_target" and MIN as consolidation function:
.IP
.nf
\f[C]
$\ rrd2csv\ AVERAGE:host::\ MIN:::memory_target
\f[]
.fi
.SH OUTPUT FORMAT
.IP
.nf
\f[C]
headers
timestamp_0,\ value_0_0,\ \&...,\ value_0_n
\&...
timestamp_n,\ value_n_0,\ \&...,\ value_n_n
\f[]
.fi
.PP
where
.TP
.B headers
.IP
.nf
\f[C]
comma-separated\ list\ of\ datasources
\f[]
.fi
.RS
.RE
.TP
.B timestamp
.IP
.nf
\f[C]
time\ in\ ISO-8601\ format\ when\ the\ data\ has\ been\ acquired
\f[]
.fi
.RS
.RE
.TP
.B value
.IP
.nf
\f[C]
floating-point\ numbers,\ or\ integers
\f[]
.fi
.RS
.RE
.SH AUTHORS
Citrix Systems.
